ALTER PROCEDURE [dbo].[CPP_InsertCreateRecord]
  @dwUserID INT,                -- 用户 I D
  @dwServerID INT,              -- 房间 标识
  @dwKindID INT,            -- 房间 ID
  @RoomID INT,
  @dwDrawCountLimit INT,            -- 局数限制
  @wJoinGamePeopleCount INT,
  @RecordType  TINYINT,
  @RecordGroupID INT,
  @RecordGroupTableID INT,
  @szDesc  NVARCHAR(128)
AS
BEGIN
  SET NOCOUNT ON

  DECLARE @Fee INT
  DECLARE @Nicname NVARCHAR(31) = ''
  DECLARE @lPersonalRoomTax BIGINT

  -- 获取创建房间玩家的昵称
  SELECT @Nicname = ISNULL(NickName, '') FROM RYAccountsDBLink.RYAccountsDB.dbo.AccountsInfo WHERE UserID = @dwUserID

  ---- 写入消耗放开记录
  INSERT INTO RYRecordDB.dbo.CreateTableRecord (
    UserID, NickName, RoomCardID, ServerID, KindID,
    DrawCountLimit, JoinGamePeopleCount, RecordType,
    szDesc, RecordGroupID, RecordGroupTableID
  )
  VALUES
    (
      @dwUserID ,@Nicname, @RoomID ,@dwServerID, @dwKindID,
      @dwDrawCountLimit, @wJoinGamePeopleCount, @RecordType,
      @szDesc, @RecordGroupID, @RecordGroupTableID
    )
  RETURN 0

END